home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / C / DATDISP.ZIP / DATADISP.DOC < prev    next >
Encoding:
Text File  |  1989-06-30  |  3.8 KB  |  97 lines

  1. Program : DATADISP (Main)
  2. Authors : W.E.R. Stroebel.
  3. Purpose : Displaying an unknown file in a "readable" way.
  4. Modules : None
  5. Compile : TCC, large model, enable stack checking.
  6. Created : June 29, 1989
  7. Edited  : June 30, 1989
  8.       - Small problem with labels fixed.
  9.       - Unknowns > 16 bytes split.
  10.  
  11. ****************************  Documentation.  ********************************
  12.  
  13. DATADISP is just a small program I put together to figure out some game score
  14. keeping files (no, I don't habitually cheat, just every other Thursday of
  15. months without a "R" in them <GRIN>).
  16.  
  17. You start the program (after compiling it first, DOS doesn't like to execute
  18. "C" source code, a major flaw in the operating system if you ask me) by typing
  19. a command line like :
  20.  
  21. DATADISP DEMODATA DEMODATA.DES
  22.  
  23. The second parameter is optional, it serves to keep the item descriptors in
  24. so you don't have to type them every time you run the program.
  25.  
  26. Commands in DATADISP are as follows :
  27.  
  28. A - Add an item descriptor. Asks for the item number to describe and what the
  29.     description should be.
  30. R - Remove an item descriptor.
  31. D - Display file starting at a certain descriptor.
  32. F - File has a fixed record size. Use this command after you have figured out
  33.     all (or most) of the file's record structure. It will ask you for a first
  34.     and last item number and copy them throughout the remainder of the file.
  35.     The reason for asking for a FIRST item number is that a lot of data files
  36.     have some sort of header that doesn't fit in a record.
  37. L - Label. Add a name to an item (max 4 characters for display reasons).
  38. Q - Quit. Terminates program (and saves your work if you specified a
  39.     descriptor file).
  40.  
  41. DATADISP knows about the following types :
  42.  
  43. D (Double)  - Data is a double word (length 4) or a double real (length 8).
  44. F (Fixed)   - Data is a fixed length string (zero padding is NOT displayed).
  45. I (Integer) - Data is an integer.
  46. L (Length)  - Data is a length coded string (first byte has length) OR :
  47. L (Long)    - Data is a long integer.
  48. R (Real)    - Data is a single precision real.
  49. U (Unknown) - Data is displayed in 16 byte chunks, hex and Ascii.
  50. W (Word)    - Data is an unsigned.
  51. Z (AsciiZ)  - Data is a zero terminated string.
  52.  
  53. *******************************  Example.  ***********************************
  54.  
  55. The enclosed file DEMO.C was used to create a small nonsense data file
  56. (DEMODATA). The file was decoded using the following commands :
  57.  
  58. A 0 <RET> S A 17 <RET>
  59. A 1 <RET> D W
  60. A 2 <RET> R D
  61. L 0 <RET> Name <RET>
  62. L 1 <RET> Age <RET>
  63. L 2 <RET> Debt <RET>
  64. F 0 <RET> 2 <RET>
  65.  
  66. generating the file DEMODATA.DES. Try entering these commands after starting
  67. DATADISP with the command :
  68.  
  69. DATADISP DEMODATA MYFILE
  70.  
  71. to see how this works.
  72.  
  73. *******************************  Various.  ***********************************
  74.  
  75. (This section is called "Various" because I was to lazy to type
  76. "Miscellaneous". It contains some things you might want to know.)
  77.  
  78. Copyright  : None except for common decency. If you make money selling this
  79.              program (great salesmanship there) let me know, I'm sure we can
  80.              work something out.
  81. Limits     : There is a maximum number of items (8125). When no descriptors
  82.              have been entered this limits the maximum file size to 130000
  83.              bytes.
  84. Support    : None. If NEVER support programs I put out in source, people have
  85.              a tendency to change 'm and it's too much trouble to figure out
  86.          what (if anything) happened.
  87. Disclaimer : This program is NOT guaranteed to do ANYTHING, let alone do 
  88.              something useful. It's unlikely to destroy anything but you can
  89.              never know. Watch out what you put in as second parameter, any
  90.              file with the same name will be destroyed.
  91.  
  92.  
  93.  
  94. Hope you'll enjoy this program.
  95. Walter E.R. Stroebel.
  96. CIS UID : 71170,1267
  97.